package com.yy.kit.zfb.dto;

import java.util.List;

/**
 * <p>
 * 支付宝菜单的dto
 * </p>
 * 
 * @author 杨阳
 * @since 2017年10月9日
 * @示例 "{" +
"      \"button\":[{" +
"        \"name\":\"最新优惠\"," +
"		 \"action_type\":\"link\"," +
"		 \"action_param\":\"http://m.alipay.com\"," +
"		 \"icon\":\"http://xxxx/test.jpg\"," +
"        \"sub_button\":[{" +
"            \"name\":\"流量查询\"," +
"			 \"action_type\":\"link\"," +
"			 \"action_param\":\"http://m.alipay.com\"," +
"			 \"icon\":\"http://example.com/test.jpg\"" +
"        }]" +
"      }]," +
		"\"type\":\"icon\"" +
"  	}"
 */
public class AlipayMenuDTO {
	
	/**
	 * 菜单类型，支持值为icon：icon型菜单，text：文本型菜单，不传时默认为"text"，当传值为"icon"时，菜单节点的icon字段必传。
	 */
	private String type = "text";
	
	/**
	 * 菜单名称，icon菜单名称不超过5个汉字，文本菜单名称不超过9个汉字，编码格式为GBK
	 */
	private String name;
	
	/**
	 * 菜单类型：
	 * out——事件型菜单
	 * link——链接型菜单
	 * tel——点击拨打电话
	 * map——点击查看地图
	 * consumption——点击查看用户与生活号管理员账号之间的消费记录
	 */
	private String action_type;
	
	/**
	 * 当actionType为link时，该参数为url链接
	 * 当actionType为out时，该参数为用户自定义参数
	 * 当actionType为tel时，该参数为电话号码
	 * 当action_type为map时，该参数为查看地图的关键字
	 * 当action_type为consumption时，该参数可不传
	 * 该参数最长255个字符，不允许冒号等特殊字符
	 */
	private String action_param;
	
	/**
	 * @see https://docs.open.alipay.com/api_3/alipay.offline.material.image.upload
	 * icon图片url，必须是http协议的url，尺寸为60X60，最大不超过5M，请先调用 图片上传接口获得图片url
	 */
	private String icon = "";
	
	private List<AlipayMenuDTO> sub_button;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAction_type() {
		return action_type;
	}
	public void setAction_type(String action_type) {
		this.action_type = action_type;
	}
	public String getAction_param() {
		return action_param;
	}
	public void setAction_param(String action_param) {
		this.action_param = action_param;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public List<AlipayMenuDTO> getSub_button() {
		return sub_button;
	}
	public void setSub_button(List<AlipayMenuDTO> sub_button) {
		this.sub_button = sub_button;
	}
	
}
